package com.app.controller;

import com.app.model.AdminUserModel;
import com.app.model.ConfigModel;
import com.app.model.ExpertModel;
import com.app.service.AdminUserService;
import com.app.service.ConfigService;
import com.app.service.ExpertService;
import com.app.util.Result;
import com.app.util.TokenUtils;
import com.app.vo.ExpertVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * @Description: 专家
 * @Author: N
 * @Date: 2022/10/29 15:26
 */
@RestController
@RequestMapping("/")
public class ExpertController {
    @Autowired
    ExpertService expertService;


    @GetMapping("/getExpertList")
    public Result<Object> getExpertList(HttpServletRequest request, ExpertModel model){
        ExpertVo vo = expertService.getListByModel(model);
        return Result.success(vo);
    }


    @GetMapping("/getExpertById")
    public Result<Object> getExpertById(HttpServletRequest request, Integer id){
        ExpertModel model = expertService.getModelById(id);
        return Result.success(model);
    }
}
